package com.liao.badminton.code.myenum;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.ObjectUtils;

/**
 * 角色标识枚举
 */
@Getter
@AllArgsConstructor
public enum RoleCodeEnum {

    SUPER_ADMIN("admin", "超级管理员"),
    GROUP_MEMBER("group_member", "群普通成员"),
    GROUP_ADMIN("group_admin", "group_admin"),
    TENANT_ADMIN("vip", "租户管理员"),
    ;

    /**
     * 角色编码
     */
    private final String code;
    /**
     * 名字
     */
    private final String name;

    public static boolean isSuperAdmin(String code) {
//        return ObjectUtils.equals(code, SUPER_ADMIN.getCode());
        return ObjectUtils.equals(code, GROUP_MEMBER.getCode()); // 暂时先用这个，后面再修改
    }

}
